package com.cskaoyan.bean.promotion.storage;


import com.cskaoyan.util.DateUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Description: 图片上传
 * @Author: WD created on 2021-09-15 22:02
 * @Version:
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class UploadPicStorageVO {
    private Integer id;
    private String key;
    private String name;
    private String type;
    private Integer size;
    private String url;
    private String addTime;
    private String updateTime;

    public UploadPicStorageVO(PicStorage picStorage) {
        this.id = picStorage.getId();
        this.key = picStorage.getKey();
        this.name = picStorage.getName();
        this.type = picStorage.getType();
        this.size = picStorage.getSize();
        this.url = picStorage.getUrl();
        this.addTime = DateUtils.dateFormat(picStorage.getAddTime());
        this.updateTime = DateUtils.dateFormat(picStorage.getUpdateTime());
    }
}
